package com.zbkj.common.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 课程视频请求对象
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="CourseVideoRequest对象", description="课程视频请求对象")
public class CourseVideoRequest implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "视频ID，编辑时传递")
    private Integer id;

    @ApiModelProperty(value = "关联的课程ID", required = true)
    @NotNull(message = "课程ID不能为空")
    private Integer courseId;

    @ApiModelProperty(value = "课时编号", required = true)
    @NotNull(message = "课时编号不能为空")
    private Integer episodeNumber;

    @ApiModelProperty(value = "课时标题", required = true)
    @NotBlank(message = "课时标题不能为空")
    private String title;

    @ApiModelProperty(value = "视频URL", required = true)
    @NotBlank(message = "视频URL不能为空")
    private String videoUrl;

    @ApiModelProperty(value = "视频封面图")
    private String coverImage;

    @ApiModelProperty(value = "视频时长(秒)")
    private Integer duration;

    @ApiModelProperty(value = "课时描述")
    private String description;

    @ApiModelProperty(value = "是否免费预览(0否1是)")
    private Boolean freePreview = false;

    @ApiModelProperty(value = "排序")
    private Integer sort = 0;

    @ApiModelProperty(value = "状态(0隐藏1显示)")
    private Boolean status = true;
}